package cn.itcast;

import cn.itcast.properties.SmsProperties;
import cn.itcast.template.SmsTemplate;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;

@EnableConfigurationProperties(
        SmsProperties.class
)
public class ItcastAutoConfiguration {

    /**
     * 创建Bean SmsTemplate 信息发送模板对象*/
    @Bean
    public SmsTemplate smsTemplate(SmsProperties smsProperties){

        return new SmsTemplate(smsProperties);
    }

}
